<template>
    <div class="box">
        <h1>Child2 - 发送数据</h1>
        <button @click="clickHandler">发送数据</button>
    </div>
</template>

<script>
import Pubsub from 'pubsub-js'
export default {
    name: "Child2",
    methods: {
        clickHandler() {
            Pubsub.publish('sendData', 256);
        }
    }
}
</script>

<style scoped>

</style>